package cn.harry.modular.news.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableName;
import cn.harry.common.base.BaseEntity;

/**
 * comment实体对象
 *
 * @author harry
 * @公众号 Harry技术
 */
@Getter
@Setter
@TableName("t_comment")
public class Comment extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    private String content;
    private Integer userId;
    private Integer parentId;
    private LocalDateTime time;
    private Integer forumId;
    private String module;
    private Integer rootId;
    private String userName;
    private String avatar;
    private String parentUserName;


    /**
     * 有效状态，0:无效 1:有效
     */
    private Integer valid;

    @TableField(exist = false)
    private List<Comment> children;


}
